<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:winter="http://www.winter.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="/layouts/layout">
	
	<div id="TelefonoGestionFragment" th:fragment="TelefonoGestionFragment">
		<winter:output id="mainTelefonoDialogOutput" class="winter-form form-container">
			<winter:output id="formTelefonoDialogOutput" class="cabecera">
				<winter:row>
					<winter:select id="selectTipoTelefono" 
						field="*{telefono.tipo}"
						collection="tiposTel, rowTiposTel : ${personas.tipos}"
						value="@{${tiposTel.id}+'|'+${tiposTel.descripcion}}" 
						text="@{${tiposTel.descripcion}}"
						label="@{'Tipo: '}" 
						required="true"
						requiredimage="/images/icons/exclamation-small-red.png"
						requiredmessage="Favor seleccione un tipo de telefono"
						modern="true"
						showglobalmessage="true">
					</winter:select>
				</winter:row>
				<winter:row>
					<winter:inputtext id="NuevoPersonaTelefono"
						field="*{telefono.numero}"
						label="#{label.common.numerotel}" 
						labeldisplay="col-xs-4"
						inputdisplay="col-xs-8"
						containerdisplay="row padded"
						class="winter-input-text capitalize"
						required="true"
						requiredimage="/images/icons/exclamation-small-red.png"
						requiredmessage="#{label.common.numerotel.requerido}"
						maxlength="50"
						maxlengthmessage="Favor ingrese hasta 50 digitos"
						type="float">
					</winter:inputtext>
				</winter:row>
				<winter:row class="button-panel-right" padded="true">
					<winter:ajaxSubmit id="CrearTelefono" 
						form="PersonasForm"
						url="@{'/personas/guardarTelefono'}"
						update="TelefonosInclude"
						object="personas" 
						value="#{label.operaciones.guardar}" 
						showstatus="true"
						class="btn btn-cyan"
						process="TelefonoCrearContainer"
						oncomplete="@{'Winter.ui.CloseDialog(\'TelefonoDialog\')'}">
					</winter:ajaxSubmit>
					<winter:ajaxSubmit id="CrearTelefonoCancelar" 
						form="PersonasForm"
						object="personas" 
						url="@{'/personas/cancelar/TELEFONO'}"
						update="DialogOutput, CrearEditarPersonaOutput"
						value="#{label.operaciones.cancelar}" 
						showstatus="true"
						class="btn btn-danger" 
						process="TelefonoCrearContainer"
						immediate="true"
						oncomplete="@{'Winter.ui.CloseDialog(\'TelefonoDialog\')'}">
					</winter:ajaxSubmit>
				</winter:row>
		    </winter:output>
		</winter:output>
	</div>
</html>